A fingerprint is applied to certify identity widely because of its biological characteristics. In a fingerprint identification process, the detected fingerprint is typically converted into a grayscaled digital image. The more difference of grayscale between a ridge and a valley of the fingerprint is, the better quality of the digital image is, thus enhancing recognition rate of the fingerprint. To adjudge the quality of the digital image, a histogram of pixel numbers is made according to the grayscale distribution of the digital image. Assuming that the gray scales of pixels in the digital image are divided into 256 levels, designated by grayscale values of 0 to 255, an ideal grayscale distribution of the digital image is within the range of grayscale values of 3 to 250, as shown in FIG. 1 for instance. Conversely, if the gray scales of pixels in the digital image are concentrated in a certain smaller range, for example as illustrated in FIG. 2 and FIG. 3, it will be difficult to distinguish the ridge and the valley of the fingerprint, thus causing incorrect identification.
A fingerprint detecting apparatus converts the detected fingerprint image into a digital image by ways of image digitizing unit where the gain value and the offset value used will influence the quality of the digital image. The gain and the offset of a conventional fingerprint detecting apparatus are set with constant values as it is manufactured. In other words, it is impossible to adjust the gain value and the offset value on the basis of using requirements. However, the set gain value and offset value are not always applicable for in various environments (such as different temperatures or humidities), fingers (such as the finger gets wet or is dry), touching conditions (such as different areas, forces, and angles), and circuit condition (for example, the circuit is aged), thus resulting in histograms as shown in FIGS. 2 and 3.
To overcome such problems, an improved fingerprint detecting apparatus contains multiple preset gain values configured to correspond to different conditions individually, but as desiring to change the gain values, it is essential to find out the grayscale value occupied by the maximum pixel number in the histogram (i.e., peak values of a curved line of FIG. 1) after storing and comparing the entire pixel numbers of the grayscale values by using large amount of memory so as to obtain the peak values of FIG. 1, thus having high cost and long operation time. Furthermore, this improved fingerprint detecting apparatus merely includes a constant offset value which cannot be changed by users and thus, even using several preset gain values, the resultant digital image is still difficult to be distinguished for some applications.